﻿<%@ Page Title="" Language="C#" MasterPageFile="~/masterpage_user.master" AutoEventWireup="true" CodeFile="Hoadon.aspx.cs" Inherits="Hoadon" %>

<asp:Content ID="Content1" ContentPlaceHolderID="user_content" Runat="Server">
    <div id ="hoadon">
        <h1>HÓA ĐƠN</h1>
        <div id = "hoadon_search">
        </div>
        <div id="hoadon_content">
            <table class="box-table-a">
                <tr>                
                    <th>Mã hóa đơn</th>
                    <th>Người bán</th>
                    <th>Sản phẩm</th>
                    <th>Số lượng</th>
                    <th>thành tiền</th>
                    <th>Tình trạng</th>
                </tr>
               <asp:Repeater ID="parent_repeater" runat="server">
               <ItemTemplate>
                <tr >
                            
                        <td rowspan='<%#Eval("soluong") %>'><%#Eval("Maphieumua") %></td>
                        <asp:Repeater ID="child_repeater" runat="server" datasource='<%# ((System.Data.DataRowView)Container.DataItem).Row.GetChildRows("myrelation") %>'>
                        <ItemTemplate>
                        
                                <td><%# DataBinder.Eval(Container.DataItem, "[\"Tenshop\"]")%></td>
                                <td><%# DataBinder.Eval(Container.DataItem, "[\"Tensanpham\"]")%></td>
                                <td><%# DataBinder.Eval(Container.DataItem, "[\"soluong\"]")%></td>
                                <td><%# DataBinder.Eval(Container.DataItem, "[\"thanhtien\"]")%></td>
                                <td><%# DataBinder.Eval(Container.DataItem, "[\"tinhtrang\"]")%></td>

                                
                </tr>
                         </ItemTemplate>
                         </asp:Repeater>
                <tr>
                            <td colspan="5">tổng giá tiền :<%#Eval("tongtien") %> </td>
                </tr> 
                </ItemTemplate>
                </asp:Repeater>  
                
            </table>
        </div>
    </div>
</asp:Content>

